package com.rt.gptnext.common.utils.http;

import lombok.Data;

/**
 * @author gaoyiyang
 */
@Data
public class Multipart {

    /** 是否文件 */
    private boolean isFile;

    /** 数据 */
    private byte[] value;

    /** 文件名 */
    private String fileName;

    /** 字段名 */
    private String name;

    private String contentType = "multipart/form-data";

    public Multipart(String name, String fileName, byte[] value, boolean isFile, String contentType) {
        this.name = name;
        this.fileName = fileName;
        this.value = value;
        this.isFile = isFile;
        if (contentType != null) {
            this.contentType = contentType;
        }
    }

}
